package com.bootdo_jpa.system.service.impl;

import javax.transaction.Transactional;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Service;

import com.bootdo_jpa.system.dao.TeachingRepository;
import com.bootdo_jpa.system.domain.TeachingDO;
import com.bootdo_jpa.system.service.TeachingService;
import com.bootdo_jpa.common.service.base.AbsCommonService;

@Service
public class TeachingServiceImpl extends AbsCommonService<TeachingDO> implements TeachingService {
	
	@Autowired
	private TeachingRepository teachingRepository;
	
	@Override
	@Transactional
	public void deleteByIds(Long... ids) {
		teachingRepository.deleteByIdIn(ids);
	}

	@Override
	public JpaRepository<TeachingDO, Long> getDao() {
		return teachingRepository;
	}

	@Override
	public JpaSpecificationExecutor<TeachingDO> getDao2() {
		return teachingRepository;
	}
	
}
